package ac.github.os.internal.core.script.impl

import ac.github.os.internal.core.script.BaseWrapper
import ac.github.os.internal.core.script.InternalConfig
import ac.github.os.internal.core.script.InternalScript
import ac.github.os.internal.core.trigger.Trigger
import taboolib.common.platform.Awake
import taboolib.common5.compileJS

@Awake
class EvalScript : InternalScript<EvalScript.Wrapper> {
    override val name: String
        get() = "eval"

    override fun execute(trigger: Trigger?, wrapper: Wrapper, config: InternalConfig, string: String): String {
        return string.compileJS()?.eval().toString()
    }

    class Wrapper : BaseWrapper

}